Matthias Clasen [Tue, 27 Oct 2020 18:24:43 +0000 (18:24 +0000)]
Merge branch 'matthiasc/atspi-child' into 'master'
Emit ChildrenChanged signal on hierarchy updates
See merge request GNOME/gtk!2752
Matthias Clasen [Tue, 27 Oct 2020 18:13:44 +0000 (18:13 +0000)]
Merge branch 'matthiasc/a11y-buildable' into 'master'
Implement accessible attributes for ui files
See merge request GNOME/gtk!2751
Benjamin Otte [Tue, 27 Oct 2020 16:27:10 +0000 (16:27 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
Closes #3295
See merge request GNOME/gtk!2748
Benjamin Otte [Tue, 27 Oct 2020 15:43:34 +0000 (16:43 +0100)]
cloudprint: Make compile without warnings
Benjamin Otte [Tue, 27 Oct 2020 15:16:16 +0000 (16:16 +0100)]
gtkmediafile: Use cubic volume function
Gstreamer suggests doing that.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1439
Fixes #3295
Jakub Steiner [Tue, 27 Oct 2020 12:55:33 +0000 (12:55 +0000)]
Merge branch 'wip/jimmac/gtk4-dropdown-papercuts' into 'master'
Adwaita: dropdown search box
See merge request GNOME/gtk!2747
Jakub Steiner [Thu, 22 Oct 2020 15:08:32 +0000 (17:08 +0200)]
Adwaita: dropdown search box
- have some whitespace around entry
Partial fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/3291
Matthias Clasen [Tue, 27 Oct 2020 05:05:33 +0000 (05:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2746
Matthias Clasen [Tue, 27 Oct 2020 04:51:00 +0000 (04:51 +0000)]
Merge branch 'popover-menu-custom-child' into 'master'
popovermenu: Allow custom items
Closes #3260
See merge request GNOME/gtk!2728
Matthias Clasen [Tue, 27 Oct 2020 04:42:38 +0000 (00:42 -0400)]
docs: Add GtkOverlay to the widget gallery
Matthias Clasen [Tue, 27 Oct 2020 04:24:54 +0000 (00:24 -0400)]
docs: Add box, grid and center box to the gallery
Matthias Clasen [Mon, 26 Oct 2020 12:21:52 +0000 (08:21 -0400)]
modelbutton: Explicitly set up LABELLED-By relation
GTK does this automatically based on mnemonics, but only
if the string actually contains a mnemonic. This makes
orca read out menuitems, as expected.
Matthias Clasen [Mon, 26 Oct 2020 16:58:23 +0000 (12:58 -0400)]
widget-factory: Add a scale to the gear menu
This tests the custom menuitem support, and lets you
control the transition duration for the main stack.
Matthias Clasen [Mon, 26 Oct 2020 17:21:28 +0000 (13:21 -0400)]
popovermenu: Allow adding custom items in ui files
Support <child type="ID"> to fill custom child slots
in both GtkPopoverMenus and GtkPopoverMenuBars that
are created in ui files.
Matthias Clasen [Tue, 20 Oct 2020 18:26:45 +0000 (14:26 -0400)]
popovermenu: Allow custom items
Add a way to add children at certain places in
the generated menu for both GtkPopoverMenu and
GtkPopoverMenuBar.
New apis:
gtk_popover_menu_add_child
gtk_popover_menu_remove_child
gtk_popover_menu_bar_add_child
gtk_popover_menu_bar_remove_child
Fixes: #3260
Matthias Clasen [Mon, 26 Oct 2020 20:09:30 +0000 (20:09 +0000)]
Merge branch 'master' into 'master'
Fix the build with cups < 2.2.12
Closes #2968
See merge request GNOME/gtk!2744
Thomas Lange [Sat, 24 Oct 2020 11:16:40 +0000 (13:16 +0200)]
Fix the build with cups < 2.2.12
PPD_CUSTOM_UNKNOWN was introduced in cups 2.3.
and has been backported to 2.2.12.
Only handle it when we build against a new enough cups.
Fixes: #2968
Matthias Clasen [Mon, 26 Oct 2020 12:01:13 +0000 (08:01 -0400)]
Treat tristate as an enum when parsing
This makes it so that you have to explicitly specify
"true" and "false" for the checked state, but it
matches how this enumeration is meant to be used.
Matthias Clasen [Mon, 26 Oct 2020 05:28:43 +0000 (05:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2741
Matthias Clasen [Mon, 26 Oct 2020 05:07:54 +0000 (01:07 -0400)]
docs: Add GtkDrawingArea to the gallery
Matthias Clasen [Mon, 26 Oct 2020 04:56:28 +0000 (00:56 -0400)]
docs: Add GtkShortcutsWindow to the widget gallery
Matthias Clasen [Mon, 26 Oct 2020 04:30:24 +0000 (00:30 -0400)]
docs: Add GtkPopoverMenu to the widget gallery
Matthias Clasen [Mon, 26 Oct 2020 04:09:55 +0000 (00:09 -0400)]
docs: Add GtkPopover to the widget gallery
Matthias Clasen [Mon, 26 Oct 2020 03:57:12 +0000 (23:57 -0400)]
docs: Add GtkPopoverMenuBar to the gallery
Matthias Clasen [Mon, 26 Oct 2020 03:31:20 +0000 (23:31 -0400)]
docs: Add GtkExpander to the gallery
Matthias Clasen [Mon, 26 Oct 2020 03:18:51 +0000 (23:18 -0400)]
docs: Add GtkEmojiChooser to the gallery
To make this possible enable the doc shooter
to take screenshots of popovers.
Matthias Clasen [Mon, 26 Oct 2020 02:54:53 +0000 (22:54 -0400)]
docs: Redo the GtkColorChooserDialog gallery image
Show the new palette.
Matthias Clasen [Mon, 26 Oct 2020 02:52:17 +0000 (22:52 -0400)]
docs: Improve the GtkStackSidebar gallery image
Matthias Clasen [Mon, 26 Oct 2020 02:46:30 +0000 (22:46 -0400)]
docs: Tweak gallery layout
Now that the volume button image is small, move it
to a better place in its section. Improves the layout.
Matthias Clasen [Mon, 26 Oct 2020 02:42:40 +0000 (22:42 -0400)]
docs: Fix the GtkVolumeButton gallery image
Give up on showing the popup, we don't do that
for other buttons either.
Matthias Clasen [Mon, 26 Oct 2020 02:32:27 +0000 (22:32 -0400)]
docs: Add GtkCalendar to the gallery
It has been missing far too long.
Matthias Clasen [Mon, 26 Oct 2020 02:26:19 +0000 (22:26 -0400)]
docs: Improve the GtkMediaControls gallery image
Matthias Clasen [Mon, 26 Oct 2020 02:17:15 +0000 (22:17 -0400)]
docs: Improve the GtkVideo gallery image
Matthias Clasen [Mon, 26 Oct 2020 02:16:26 +0000 (22:16 -0400)]
docs: Tweak gallery layout
Improve the breaks in the container section.
Matthias Clasen [Mon, 26 Oct 2020 01:52:51 +0000 (21:52 -0400)]
docs: Shrink the editable label gallery image
Makes it fit better with the other entries.
Matthias Clasen [Mon, 26 Oct 2020 01:47:40 +0000 (21:47 -0400)]
docs: Some reordering in the gallery
Align things better.
Matthias Clasen [Mon, 26 Oct 2020 01:28:26 +0000 (21:28 -0400)]
docs: Work around GtkPicture growing
Make the GtkPicture gallery image stay within its
limits, by overpowering its request mode.
Matthias Clasen [Mon, 26 Oct 2020 01:10:12 +0000 (21:10 -0400)]
docs: Tweak gallery ordering
Move GtkSpinButton to the entries, where it
belongs, despite its name.
Matthias Clasen [Mon, 26 Oct 2020 01:07:12 +0000 (21:07 -0400)]
docs: Fix links from the gallery
It turns out gtk-doc can't even parse its own custom
links if you don't arrange for the <link> element to
on a single line, since it is just a glorified sed
script :(
Matthias Clasen [Mon, 26 Oct 2020 01:05:10 +0000 (21:05 -0400)]
docs: Add GtkWindowControls to the gallery
Matthias Clasen [Sun, 25 Oct 2020 23:29:00 +0000 (19:29 -0400)]
a11y: Add more tests
Test some of the attributes that GTK maintains
for every widget.
Matthias Clasen [Sun, 25 Oct 2020 17:01:44 +0000 (13:01 -0400)]
a11y: Add some parser tests
Checking basic support for acessible states, properties
and relations in ui files.
Matthias Clasen [Sun, 25 Oct 2020 16:43:26 +0000 (12:43 -0400)]
Remove erroneous preconditions
Tests found these functions to be non-working.
Matthias Clasen [Sun, 25 Oct 2020 16:38:52 +0000 (12:38 -0400)]
a11y: Reuse builder parsing for enums
No need to manually write all these parsing functions
when _gtk_builder_enum_from_string does exactly what
is needed here.
Matthias Clasen [Sun, 25 Oct 2020 16:20:55 +0000 (12:20 -0400)]
a11y: Parse booleans in ui files as expected
Accept the same syntax for booleans as GtkBuilder
does elsewhere.
Matthias Clasen [Sun, 25 Oct 2020 16:19:21 +0000 (12:19 -0400)]
builder: Expot _gtk_builder_boolean_from_string privately
When specifying accessible properties in ui files, it
is better to accept the same syntax for booleans as
elsewhere, so lets reuse this function.
Piotr DrÄ…g [Sun, 25 Oct 2020 09:37:47 +0000 (10:37 +0100)]
Update Polish translation
Matthias Clasen [Sun, 25 Oct 2020 04:29:30 +0000 (00:29 -0400)]
scale: Set round-digits to -1 initially
This ensures that keybindings for small-step changes
work despite draw-value being FALSE now. This was
fallout from
8ca612c9664bf6f8ae7fe that showed up
as arrow keys not working anymore for the color scales
in the color chooser.
Matthias Clasen [Sun, 25 Oct 2020 00:57:54 +0000 (20:57 -0400)]
Cosmetics
Remove some comments that refer to no longer
existing menu code.
Matthias Clasen [Sun, 25 Oct 2020 03:55:56 +0000 (23:55 -0400)]
color editor: Add accessible labels
Add some labels to the controls in this dialog.
Matthias Clasen [Sun, 25 Oct 2020 03:12:36 +0000 (23:12 -0400)]
a11y: More State<>Change confusion
We should really avoid this needless duplication
- the 'state' is never stored anywhere.
Matthias Clasen [Sun, 25 Oct 2020 02:05:17 +0000 (22:05 -0400)]
a11y: Handle all cases for state change
Make state_change handle state changes for non-widgets,
and handle the cases for HIDDEN involving stack pages.
Matthias Clasen [Sun, 25 Oct 2020 02:04:26 +0000 (22:04 -0400)]
stack: Update HIDDEN a11y state for stack pages
This will let us handle additions and removals
in the AT-SPI backend.
Matthias Clasen [Sun, 25 Oct 2020 01:35:35 +0000 (21:35 -0400)]
Cosmetics
Make gtk_at_spi_root_child_changed take a
GtkAccessible for the child.
Matthias Clasen [Sun, 25 Oct 2020 01:10:01 +0000 (01:10 +0000)]
Merge branch 'meson-deps-continued' into 'master'
Turn more options into "feature"
See merge request GNOME/gtk!2708
Matthias Clasen [Sun, 25 Oct 2020 00:54:55 +0000 (20:54 -0400)]
stack: Don't transition when the visible child is remove
This is a corner-case, and it is causing crashes in
the shortcuts window, after
a11ab6c995a38fde0eba.
Matthias Clasen [Sat, 24 Oct 2020 19:26:12 +0000 (15:26 -0400)]
a11y: Redo child-added/-removed for toplevels
Instead of monitoring the list of toplevels, rely
on GtkWindow updating the HIDDEN state before windows
get removed. This is better, since we still have the
object available when it happens, so we can pass it
to the ATs.
Matthias Clasen [Sat, 24 Oct 2020 19:23:12 +0000 (15:23 -0400)]
window: Maintain accessible HIDDEN state
We want to use the HIDDEN state to control when
things get added and removed from the accessible
tree, so ensure that we a) set HIDDEN to true
initially for windows, and b) we update HIDDEN
when a window is shown or hidden.
The second part is handled by gtk_widget_hide
for other widgets, but hiding a window does not
always go through that code path.
Matthias Clasen [Sat, 24 Oct 2020 17:17:20 +0000 (13:17 -0400)]
a11y: Emit child notification when toplevels get hidden
When a toplevel window gets hidden (and not destroyed),
the frontend code set the HIDDEN state, and we need to
emit child notification when that happens.
Matthias Clasen [Sat, 24 Oct 2020 17:14:44 +0000 (13:14 -0400)]
a11y: Improve child index helpers
We need to use gtk_accessible_should_present() whenever we
calculate accessible tree positions, to avoid inconsistencies.
While we are at it, make these helpers usable for finding
the position of accesibles that are now ignored, by not
looking at should_present for the object itself. This will
be relevant when we calculate the position of objects whose
HIDDEN state changes.
Matthias Clasen [Sat, 24 Oct 2020 17:13:07 +0000 (13:13 -0400)]
a11y: Improve child notification for toplevels
We need to translate the list model position into
an accessible tree position, since hidden toplevels
will be skipped.
While we are at it, add an api for this notification
that will be used in the next commit.
Matthias Clasen [Sat, 24 Oct 2020 15:22:09 +0000 (11:22 -0400)]
a11y: Skip non-presented children when required
Whenever we determine the index of a child, we need
to skip its non-presented siblings.
Matthias Clasen [Sat, 24 Oct 2020 15:14:18 +0000 (11:14 -0400)]
a11y: Handle HIDDEN state changes
Hidden elements are not presented in the accessible
tree, so when then HIDDEN state changes, we should
emit child-added or -removed signals.
This commit does not yet handle all cases (HIDDEN
toplevels or hidden stack pages are not handled),
but it should cover the common case.
Matthias Clasen [Sat, 24 Oct 2020 14:32:24 +0000 (10:32 -0400)]
a11y: Don't present HIDDEN accessibles
The ARIA spec is clear on this: when an element has the
HIDDEN state, it should not be presented in the accessible
tree.
This change is incomplete, we also need to emit child-added/
removed signals when the state changes, but that needs to
wait for the child added infrastructure to land.
Matthias Clasen [Sat, 24 Oct 2020 15:12:19 +0000 (11:12 -0400)]
widget: Don't add reordered children
gtk_widget_reposition_after is called both to add new children,
and to reposition existing children. We only want to emit
accessible changes in the former case (since AT-SPI doesn't
have events for reordering).
Matthias Clasen [Sat, 24 Oct 2020 15:11:43 +0000 (11:11 -0400)]
a11y: Fix up state / change enum confusion
Matthias Clasen [Sat, 24 Oct 2020 12:53:01 +0000 (12:53 +0000)]
Merge branch 'flush-events' into 'master'
Flush events
See merge request GNOME/gtk!2740
Matthias Clasen [Fri, 23 Oct 2020 21:03:00 +0000 (17:03 -0400)]
gdk: Deliver queued events on flush
The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
Matthias Clasen [Fri, 23 Oct 2020 19:07:25 +0000 (15:07 -0400)]
NEWS: Updates
Matthias Clasen [Fri, 23 Oct 2020 17:25:33 +0000 (17:25 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3226
See merge request GNOME/gtk!2739
Matthias Clasen [Fri, 23 Oct 2020 16:27:55 +0000 (12:27 -0400)]
editablelabel: Properly clean up in dispose
Unparenting the stack finalizes the entry and label,
but at least the label is available via the
gtk_editable_get_delegate API, and the a11y
implementation uses that at dispose time. So, clear
the pointers to prevent them from being dangling.
This was showing up as a segfault of the doc-shooter.
Matthias Clasen [Fri, 23 Oct 2020 16:19:31 +0000 (12:19 -0400)]
Give all search entries an icon
This was first requested for the search entry in
GtkDropDown, but it is better to be consistent and
give every search entry an icon.
Related: #3291
Matthias Clasen [Fri, 23 Oct 2020 15:51:02 +0000 (11:51 -0400)]
window: Fix state updates
When the compositor unmaximized the window, we get a
state-changed signal, and we update the maximized field.
But then we go and recompute our layout based on the
maximize_initially field, and that is still TRUE, when
we were maximized initially. So we need to update both
fields.
This fixes a problem where using the window menu to
unmaximize an initially maximized window would not
work.
Fixes: #3226
Matthias Clasen [Fri, 23 Oct 2020 01:45:22 +0000 (01:45 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2737
Matthias Clasen [Thu, 22 Oct 2020 23:59:21 +0000 (19:59 -0400)]
Tweak focus tests
These tests are a bit fragile because the initial focus
that is taken depends on what ends up in the center of
the window, horizontally or vertically, which depends
on things like fonts, or theme spacing.
This commit makes some tweaks to push things in the
widget-factory example around far enough to make the
tests work again.
We should figure out a way to make this more robust.
Matthias Clasen [Thu, 22 Oct 2020 22:53:34 +0000 (22:53 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2735
Matthias Clasen [Thu, 22 Oct 2020 18:33:41 +0000 (14:33 -0400)]
dropdown: Add an icon the search entry
A small detail for #3291.
Matthias Clasen [Thu, 22 Oct 2020 18:27:19 +0000 (14:27 -0400)]
passwordentry: Respect border spacing
We are not using a box layout here since we want
to ignore the icons for measuring. But we still
want the layout to respect border spacing that
comes from the theme.
Matthias Clasen [Thu, 22 Oct 2020 18:26:21 +0000 (14:26 -0400)]
Adwaita: Set border-spacing for entries
When our entries contain icons, they should not run
directly into the text, so put some spacing between
the children of entries.
Matthias Clasen [Thu, 22 Oct 2020 14:52:57 +0000 (14:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2736
Matthias Clasen [Thu, 22 Oct 2020 13:55:50 +0000 (09:55 -0400)]
a11y: Handle stack case for addition/removal
Since we interpose stack pages as non-widget accessibles,
we need to tweak the signals we emit when their corresponding
widgets get added or removed.
Matthias Clasen [Thu, 22 Oct 2020 14:02:22 +0000 (10:02 -0400)]
stack: Change ordering for removal
Unparent the child widget before tearing down its
stack page. This is necessary so a11y can still access
the stack page accessible to emit change notification
when it learns that the child is removed.
Emmanuele Bassi [Thu, 22 Oct 2020 12:33:49 +0000 (13:33 +0100)]
docs: Fix cross-linking for GIO types
Matthias Clasen [Thu, 22 Oct 2020 04:22:15 +0000 (00:22 -0400)]
gtk-demo: Speed up image demo
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
Matthias Clasen [Thu, 22 Oct 2020 04:05:50 +0000 (00:05 -0400)]
gtk-demo: Add alternative text to a GtkPicture
This lets us text GtkPicture a11y support.
Matthias Clasen [Thu, 22 Oct 2020 04:04:52 +0000 (00:04 -0400)]
picture: Set alternative text as description
Use the alternative text as accessible description
for GtkPicture.
Matthias Clasen [Thu, 22 Oct 2020 03:54:09 +0000 (23:54 -0400)]
colorbutton: Improve accessibility
Make the swatch not appear selectable, and
set an accessible label on it.
Matthias Clasen [Thu, 22 Oct 2020 03:34:37 +0000 (23:34 -0400)]
a11y: Add actions for color swatches
Add the same actions that we exported in GTK 3.
Matthias Clasen [Thu, 22 Oct 2020 03:08:04 +0000 (23:08 -0400)]
colorswatch: Export some functions for a11y
Make simple functions to activate, select or customize
a GtkColorSwatch. These will be exported by a11y as
actions.
Matthias Clasen [Thu, 22 Oct 2020 02:52:46 +0000 (02:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2734
Matthias Clasen [Thu, 22 Oct 2020 01:54:17 +0000 (21:54 -0400)]
linkbutton: Use the LINK role
It is a bit ambiguous, but I think link buttons are
more links than buttons. See WAI-ARIA for a discussion
of the differences.
Update tests to match.
Matthias Clasen [Thu, 22 Oct 2020 01:47:14 +0000 (21:47 -0400)]
a11y: Document abstract roles
Since we mention abstract roles in the documentation
for GtkAccessibleRole, we should say what roles are
abstract. Doing this shows that we actually use two
abstract roles heavily, ourselves: WIDGET and WINDOW.
Matthias Clasen [Thu, 22 Oct 2020 01:40:19 +0000 (21:40 -0400)]
a11y: Document roles used in menu
Matthias Clasen [Wed, 21 Oct 2020 23:13:03 +0000 (19:13 -0400)]
atspi: Give model buttons a click action too
GtkModelButton is no longer derived from GtkButton,
but can still treat it like a button for the purposes
of having a click action. This lets ATs activate
menu items again.
Matthias Clasen [Thu, 22 Oct 2020 00:28:30 +0000 (20:28 -0400)]
modelbutton: Recreate our AT context
When the button role changes, we want to update the
accessible role to match. Since accessible roles are
unchangeable post-creation of the AT context, we have
to cheat a bit and recreate the whole context.
Matthias Clasen [Wed, 21 Oct 2020 20:35:39 +0000 (16:35 -0400)]
modelbutton: Initial accessibility setup
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
Matthias Clasen [Wed, 21 Oct 2020 20:34:16 +0000 (16:34 -0400)]
popovermenubar: Initial accessibility setup
Set roles, properties and relations according to the
ARIA authoring practices document. This is not quite
complete.
Matthias Clasen [Wed, 21 Oct 2020 20:30:04 +0000 (16:30 -0400)]
popovermenu: Initial accessibility setup
Set roles, properties and relations according to the
ARIA authoring practices document.
Xavier Claessens [Thu, 22 Oct 2020 00:36:23 +0000 (00:36 +0000)]
Apply 1 suggestion(s) to 1 file(s)
Matthias Clasen [Wed, 21 Oct 2020 20:27:23 +0000 (16:27 -0400)]
menubutton: initial accessibility setup
Set roles, properties and relations according to the
ARIA authoring practices document.